home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
kernel
/
stdma.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
3KB
|
134 lines
*** /tmp/,RCSt1022320 Wed Jul 25 13:55:58 1990
--- stdma.c Mon Jul 23 22:35:20 1990
***************
*** 1,2 ****
! #ifdef ATARI_ST
/*
--- 1,2 ----
! #if (CHIP == M68000)
/*
***************
*** 20,21 ****
--- 20,22 ----
* dmawdat: set dma_mode and write word to dma_data
+ * dmawcmd: set dma_mode and write word to dma_data in one access
* dmacomm: like dmawdat, but first toggle WRBIT
***************
*** 23,29 ****
! #include "../h/const.h"
! #include "../h/type.h"
! #include "../h/com.h"
! #include "const.h"
! #include "type.h"
#include "proc.h"
--- 24,27 ----
! #include "kernel.h"
! #include <minix/com.h>
#include "proc.h"
***************
*** 45,47 ****
*===========================================================================*/
! PUBLIC dmagrab(p, func)
int p;
--- 43,45 ----
*===========================================================================*/
! PUBLIC void dmagrab(p, func)
int p;
***************
*** 68,70 ****
*===========================================================================*/
! PUBLIC dmafree(p)
int p;
--- 66,68 ----
*===========================================================================*/
! PUBLIC void dmafree(p)
int p;
***************
*** 73,75 ****
! xxxint = 0; /* no more DMA interrupts */
ASSERT(qhead == p);
--- 71,73 ----
! xxxint = (int(*)())0; /* no more DMA interrupts */
ASSERT(qhead == p);
***************
*** 84,86 ****
*===========================================================================*/
! PUBLIC dmaint()
{
--- 82,84 ----
*===========================================================================*/
! PUBLIC void dmaint()
{
***************
*** 95,97 ****
*===========================================================================*/
! PUBLIC dmaaddr(ad)
phys_bytes ad;
--- 93,95 ----
*===========================================================================*/
! PUBLIC void dmaaddr(ad)
phys_bytes ad;
***************
*** 107,108 ****
--- 105,108 ----
PUBLIC int dmardat(mode, delay)
+ int mode;
+ int delay;
{
***************
*** 113,115 ****
! PUBLIC dmawdat(mode, data, delay)
{
--- 113,118 ----
! PUBLIC void dmawdat(mode, data, delay)
! int mode;
! int data;
! int delay;
{
***************
*** 120,125 ****
! PUBLIC dmacomm(mode, data, delay)
{
! DMA->dma_mode = mode;
DMA->dma_mode = mode ^ WRBIT;
DMA->dma_mode = mode;
--- 123,139 ----
! PUBLIC void dmawcmd(dm)
! union { long l; struct { short data; short mode; } dm; } dm;
{
! register long l;
! l = dm.l;
! *((long*)&DMA->dma_data) = l;
! }
!
! PUBLIC void dmacomm(mode, data, delay)
! int mode;
! int data;
! int delay;
! {
DMA->dma_mode = mode ^ WRBIT;
+ while (--delay >= 0);
DMA->dma_mode = mode;
***************
*** 130,131 ****
--- 144,147 ----
PUBLIC int dmastat(mode, delay)
+ int mode;
+ int delay;
{
***************
*** 135,136 ****
}
! #endif ATARI_ST
--- 151,152 ----
}
! #endif